Effects of photon field on heat transport through a quantum wire attached to leads