Yes… and no.
You can swap them, but the connectors are different. Mains voltage uses a GU10 connector (push in and twist to lock) where as yours will probably have a MR16 connector (they push straight in with two spikes).
*if* your holders have a loose lead connector in – then this could be changed for a new GU10 connector and the transformers removed, but the old connector may be part of the holder, in which case you’d need a whole new unit..
The ip65 comment from RicB is also relevant. Any device used within certain distance from a bath or shower must be rated against water ingress. (generally the second digit should be a 5 or better)
Also your lighting circuit should be RCD protected to meet regs.. If your distribution board is not new or hasn’t been upgraded then you possibly don’t have this..
J