Removing offset due to PNP output
You're using the PNP as an emitter follower so no wonder it adds a voltage to the bottom side of the waveform.

What you need to do is use an NPN or an NMOS transistor. Then the polarity of the signal from opamp U1 (used as a comparator) is "upside down" but that is easy to fix: just swap the + and - inputs of the opamp.

In the case that you use an NPN, do not forget to add a base resistor between the base of the NPN and the output of the opamp. A 1 kohm resistor will do the job.

Get more info here about 3 and 4 wire fans.