Single- and multi-walled molybdenum disulfide (MoS$_2$) nanotubes have been coaxially grown on small diameter boron nitride nanotubes (BNNTs) which were synthesized from heteronanotubes by removing single-walled carbon nanotubes (SWCNTs), and systematically investigated by optical spectroscopy. The strong photoluminescence (PL) from single-walled MoS$_2$ nanotubes supported by core BNNTs is observed in this work, which evidences a direct band gap structure for single-walled MoS$_2$ nanotubes with around 6 - 7 nm in diameter. The observation is consistent with our DFT results that the single-walled MoS$_2$ nanotube changes from an indirect-gap to a direct-gap semiconductor when the diameter of a nanotube is more than around 5 nm. On the other hand, when there are SWCNTs inside the heteronanotubes of BNNTs and MoS$_2$ nanotubes, the PL signal is considerably quenched. The charge transfer and energy transfer between SWCNTs and single-walled MoS$_2$ nanotubes were examined through characterizations by PL, XPS, and Raman spectroscopy. Unlike the single-walled MoS$_2$ nanotubes, multi-walled MoS$_2$ nanotubes do not emit light. Single- and multi-walled MoS$_2$ nanotubes exhibit different Raman features in both resonant and non-resonant Raman spectra. The method of assembling heteronanotubes using BNNTs as templates provides an efficient approach for exploring the electronic and optical properties of other transition metal dichalcogenide nanotubes.