Despite recent advances in targeted drugs and immunotherapy, cancer remains "the emperor of all maladies" due to inevitable emergence of resistance. Drug resistance is thought to be driven by mutations and/or dynamic plasticity that deregulate pathway activities and regulatory programs of a highly heterogeneous tumour. In this study, we propose a modelling framework to simulate population dynamics of heterogeneous tumour cells with reversible drug resistance. Drug sensitivity of a tumour cell is determined by its internal states, which are demarcated by coordinated activities of multiple interconnected oncogenic pathways. Transitions between cellular states depend on the effects of targeted drugs and regulatory relations between the pathways. Under this framework, we build a simple model to capture drug resistance characteristics of BRAF-mutant melanoma, where two cell states are described by two mutually inhibitory -main and alternative -pathways. We assume that cells with an activated main pathway are proliferative yet sensitive to the BRAF inhibitor, and cells with an activated alternative pathway are quiescent but resistant to the drug. We describe a dynamical process of tumour growth under various drug regimens using the explicit solution of mean-field equations.Based on these solutions, we compare efficacy of three treatment strategies: static treatments with continuous and constant dosages, periodic treatments with regular intermittent phases and drug holidays, and treatments derived from optimal control theory (OCT). Based on these analysis, periodic treatments outperform static treatments with a considerable margin, while treatments based on OCT outperform the best periodic treatment. Our results provide insights regarding optimal cancer treatment modalities for heterogeneous tumours, and may guide the development of optimal therapeutic strategies to circumvent drug resistance and due to tumour plasticity.