Production of Astrophysical X-Rays by Transition Radiation