Unlike traditional wireless routing protocols which use a single fixed path, opportunistic routing explicitly takes advantage of the broadcast nature of wireless communications by using a set of forwarders to opportunistically perform packet forwarding. A key issue in the design of opportunistic routing protocols is the forwarder list selection problem. In this paper we establish a general theory for analyzing the forwarder list selection problem, and develop an optimal solution, the minimum transmission selection (MTS) algorithm, which minimizes the expected number of transmissions and it can be incorporated into existing opportunistic routing protocols to select optimal forwarder lists. Our theory and algorithm can also be generalized to optimize other routing objectives such as minimizing the expected transmission time or energy consumption in opportunistic routing. Through extensive simulations, we demonstrate that in more than 90% cases the MTS algorithm outperforms the ETX forwarder selection scheme used in existing opportunistic routing protocols such as ExOR and MORE.