Controlling Chemical Reactivity with Optimally Oriented Electric Fields: A Generalization of the Newton Trajectory Method