Photothermal investigation of transport in semiconductors: Theory and experiment