Why I can't get a clean signal from my opto-isolator?
It's not getting to zero because the Current Transfer Ratio of your optoisolator is not high enough. You need to have about 3-5x better to be safe. The lowest grade of 4N35 has a CTR of 40%, meaning you might be able to drive a 4-5K pullup safely. So your pullup is too low. 

The reason your rise time is so sluggish is that the pullup is too high for clean square waves at 30kHz. Here (from a datasheet) is the rise time vs. load resistance: 



Phototransistors are just not very good for this sort of application. Fortunately, there's a very similar (in ease of application) part that should work for you- the "Logic Output" optocoupler with Schmitt trigger action, for example the H11L1M. 



This part is okay with a 12V supply (operating range to 15V), and will sink 16mA with less than 400mV drop, so your 12mA from the 1K pullup will be fine. Turn on and off times are 4usec maximum (1.0/1.2 usec typical) and the rise and fall times are 100nsec typical.