Optoacoustic spectroscopy and detection