Controlled doping is one of the most important and challenging problems in semiconductor physics. For a specific application it is often desirable to introduce a specific dopant at a particular site to generate required carriers. For example, ZnO is easy to be doped n-type but is difficult to be doped p-type. In principle, p-type doping in ZnO can be achieved by using group-I elements such as Li substituting at Zn site. However, for small dopant such as Li, they often favor interstitial positions, which makes it a donor and passivate p-type dopants such as Li_Zn. This is especially true when the Fermi energy is close to the valence band maximum (VBM) in p-type material. Using first-principles method, we show that the preference of substitutional and interstitial doping can be tuned through external strain, either hydrostatic or epitaxial, because doping induces a local volume change around the dopants. When the external strain is applied in the same direction as the dopant induced volume change, the solubility of that type of dopant is enhanced. As an example, we show that Li substitution on Zn sites in ZnO can be enhanced against the Li interstitial doping by applying a compressive strain. We suggest that this simple and general strategy should be very useful to control doping and electronic properties of many semiconductor materials.