Filtering DC offset of a pulse train
The simple and obvious answer that meets your specs is:



This thresholds the input around the midpoint of what you say the high and low levels are.  In practise a little hysteresis is probably wise:



This will create about a 50 mV hystersis band.  For example, when the input goes high so that the output goes high, the input has to go 50 mV lower before the output will go low.  The hystesis band will be a little assymetric due to your threshold of 3.3 V not being in the middle of the output.  This can be compensated for several ways, including adjusting the reference voltage fed into the negative input.  Let me know if you want to get into those details.