The only adult risks for HIV are:
1) having unprotected, penetrative vaginal or anal sex with someone of unknown status, or
2) sharing intravenous drug needles
You had zero risk for HIV. I don't know why your doctor said you had a risk, but he is woefully uninformed. PEP is generally reserved for those who have a risk encounter with someone who is known to be HIV+, or is very likely to be HIV+. Neither of those applies to you.
If your ex has not had unprotected intercourse with someone else since you broke up, he was never at risk for HIV either, and therefore, cannot give it to you. (Plus, as mentioned, this was NOT a risk event for HIV.)