Progress toward the development of a safe and effective treatment for AIDS has been slow because the Human Immunodeficiency Virus has the ability to mutate its own structure. This mutation enables the virus to become resistant to previously effective drug therapies. Apart from the traditional role of preventing progression from HIV to AIDS Antiretroviral drugs have an additional clinical benefit of substantially reducing infectiousness thus making them an important strategy in the fight against HIV. Recent advances in drug therapy have seen the use of antiretroviral medications as a prophylaxis administered either as post-exposure prophylaxis after high-risk exposure or as pre exposure prophylaxis in those with ongoing HIV exposure. In this study, we constructed a compartmental heterosexual transmission model based on the dynamics of HIV in Sub-Sahara. The population is stratified by gender and HIV risk (according to their sexual preferences). Given a finite amount of drugs, a numerical optimization algorithm is then used to find optimal allocation of the drugs amongst risk groups that minimizes objective functions such as total number of deaths, infections and cost.