Bremsstrahlung contribution to the X-ray spectrum in coupled photon-electron transport