The GM may allow the transforming construct template to be applied to constructs gained from class features
Many templates that can be added to constructs—like the haunted construct template and the lifespark construct template—are tools only for the GM to use to create interesting encounters rather than toys for PCs. That is, unless a template says otherwise, the GM decides if a construct's owner can apply the template and if so then how. It doesn't matter if the construct's gained through a machinesmith's greatwork, a tinker's deploy automation or the alpha, or the hard work and pseudoscience of an ambitious yet disgraced eastern European doctor (and his hunchback cohort) using the feat Craft Construct, if a template provides no rules for its application to a construct, the GM has the final say over the template's application.
However, while the template transforming construct is from Green Ronin's Advanced Bestiary, the template is applied according to the Building and Modifying Constructs rules from Paizo's own Ultimate Magic, which, if the GM permits using those rules, allow an owner to modify a construct, therefore including adding the template.
According to Building and Modifying Constructs, "A modification can only be performed while the construct is inanimate or nonfunctioning," making it easiest to perform the modification before the construct is given the semblance of life by its owner casting the necessary spells (the typical means of construct animation). This player is unaware of a method to render a construct nonfunctional except by destroying the construct (which, afterward, typically makes modifying the construct pointless). Nonetheless, this GM would allow an owner to command the construct into a nonfunctional state unless the construct were, for example, out of control (such as a berserk flesh golem).
Then, as per the template transforming construct, the owner spends 12,500 gp and 12 days modifying the construct. Further, the template has as prerequisites for its application that the owner possess the feat Craft Construct and have access to the spell polymorph. (This GM would waive the usual Spellcraft skill check as there appears to be no caster level associated with these constructs that are granted as class features anyway.)
Note that a machinesmith doesn't gain the feat Craft Construct until level 15, and, so far as I can tell, a tinker never does. Further, neither class seems to have ready access to the polymorph spell.
But, assuming the owner can overcome all these obstacles—the optional rules, the time, the money, the feat, and the spell—, a machinesmith or a tinker seems to be able to apply the template transforming construct to constructs gained as class features. However, were such a modified construct subsequently destroyed, the modifications would need to be made anew on the next construct for it also to become a transforming construct.