How long are your crankarms? I wonder if you need shorter ones. Flexing my knees too much at the top of the pedal stroke gives me problems. And like you, mashing seemed better than spinning when I had crankarms that were too long, for a couple of reasons - the simple fact of fewer pedal strokes per a given distance, and also keeping a lot of weight on the pedals unweighted my @$$ and lifted me slightly higher. With 165mm cranks I'm much happier to spin.
Hope you get it sorted soon, knee trouble is miserable.
