Optical spectroscopy for tissue diagnostics and treatment control