System-level optimization in spectroscopic photoacoustic imaging of prostate cancer