Transient optoacoustic pulse generation and detection