Resolved sideband spectroscopy for the detection of weak optical transitions