Core-shell GaAs-based nanowires monolithically integrated on Si constitute a promising class of nanostructures that could enable light emitters for fast inter- and intrachip optical connections. We introduce and fabricate a novel coaxial GaAs/(In,Ga)As dot-in-a-well nanowire heterostructure to reach spontaneous emission in the Si transparent region, which is crucial for applications in Si photonics. Specifically, we achieve room temperature emission at 1.27 $mu$m in the telecommunication O band. The presence of quantum dots in the heterostructure is evidenced by a structural analysis based on scanning transmission electron microscopy. The spontaneous emission of these nanowire structures is investigated by cathodoluminescence and photoluminescence spectroscopy. Thermal redistribution of charge carriers to larger quantum dots explains the long wavelength emission achieved at room temperature. Finally, in order to demonstrate the feasibility of the presented nanowire heterostructures as electrically driven light emitters monolithically integrated on Si, a light emitting diode is fabricated exhibiting room-temperature electroluminescence at 1.26 $mu$m.