If you are looking for an inexpensive way to run a DC engine on an AC transformer, then use a bridge rectifier rated at; 50 volts, 6 amps. You can get one at most electronic parts stores or from internet vendors like; Mouser.com or Digikey elecrtronics, Radio Shack(if you still have one nearby) for only a few dollars plus shipping. The bridge rectifier should be around $3.00 at the most.
You run both the hot & common wire to the rectifier's two ~ and then run the wires from the rectifier's + and - to the track.
Lee Fritz