infrared phototransistor question

[ actually to be complete I should say that all semiconductor pn-junctions can emit light, especially if designed
with a transparent package, but a phototransistor is optimized for detection, not emitting, a good emitter LED
will be orders of magnitude brighter than a random bipolar device. ]

The reason plastic transistor packages are black is specifically to prevent unwanted photo-transistor action, BTW!