Here, we predict the resource allocation patterns of malaria parasites that maximize fitness in drug‐treated hosts. We extend a previously published mechanistic model of within‐host malaria infection (Greischar et al., 2014; Greischar et al., 2016a) and use numerical optimization techniques to determine optimal conversion rates, that is, the proportion of infected host cells that produce transmission stages. Into this framework, we incorporate a simple model of drug action that was parameterized for the treatment of experimental rodent malaria infections with the antimalarial drug pyrimethamine (Huijben et al., 2013). By holding constant the duration and timing of drug treatment, but varying dose, this heuristic model allows us to explore the predicted impact of treatment of variable efficacy—from small to large reductions in parasite load—on parasite life history evolution. We explore optimal investment in transmission stages, first, by assuming parasites are constrained to a constant conversion rate throughout infections and, second, by permitting parasites to employ time‐varying conversion rates. Finally, we quantify the extent to which altering life history according to these optimal patterns can buffer against the effects of drugs and we evaluate the consequences for host health and onward transmission.