Gravar-mail: Model-based optical and acoustical compensation for photoacoustic tomography of heterogeneous mediums