About 90% of yeast infections are caused by Candida albicans, which is senstive to the imidazole drug class, which includes both
Diflucan and Monistat. Most of the rest are caused C. glabrata, which is
resistant to the imidazoles and requires alternative treatments, such as nystatin (usually sold generically) or caspofungin (Cancidas). You should discuss this possibility with your doctor.
In the meantime, I see little reason for concern about STDs.