Does code allow for in-wall mounting of low voltage transformers?
By the way, 55W heat dissipation is not allowed inside a 1-gang box.  The 55W restriction is not about that, it's about something else.  Other than that...

Nothing in Code prohibits this

But I'm not aware of any products that offer this in 12 volts DC.  The lingua franca of low-voltage wiring in the US is 24 volts AC, and always has been.  They certainly do make that in a "junction box cover" form-factor; however it's pretty industrial looking since it's made for installation in unimproved spaces, and the low voltage side (and often the whole transformer) sits on the outside of the box.  

In any case, any such product should include the necessary dividers, to keep low voltage and mains rigidly separate.  LV and mains are allowed in the same multi-gang junction box if a divider is physically installed.  

I'm concerned that such a thing might not exist.  Fitting inside a gang-box, it definitely has to be UL-listed. Going through the UL listing process may be too onerous for a niche product with a limited market.