Quantum control of radical pair reactions by local optimization theory.