I've got a higher voltage square wave input that I'm feeding through FOD817B Optoisolator. The square wave frequency is in the range of 30 to 300 Hz.
The Circuit is like this:
I've tried to filter the Circuit as shown above, it works ok, but it's still quite noisy.
(Scroll Down To Bolded Area) Here are some screenshots from the scope:
No Filter Higher Freq Higher Frequency
No Filter Low Freq(noisier) 
With Filter(low freq.) 
After realizing my scope was not properly grounded to the circuit Here are the correct signals On Occasion I would see the Optoisolated Signal create the similar/same sharp downward spike in the middle of the positive cycle of the square wave. Like the 12 Unfilitered Signal, but sharper.