The way some beam break detectors work is by transmitting a modulated signal (square wave) and receiving the signal and only amplifying the AC portion of the signal though AC coupling, this eliminates the effects of ambient light.
In essence, the method you have described will work almost the same as AC coupling the signal, take care you have enough headroom (low enough gain so as not to overload in direct sunlight) in your trans-impedance amplifier.