I used to get that kind of pain. First check your seat height. It can also be too high.
But for pain on the outside of the knee I shifted to a cleat that allowed my feet to move (swivel) a little bit side to side (Mavic). I don't know if that kind of pedal is even still available, but it really solved the problem.
...ken