You should ask your doctor again. If he will say axactly that again, then for your safety is better to change doctor.
Vaccines "against infections" are unknown to science and not exist. All vaccines are against illness. Vaccines can't kill any virus or bacteria. No one.They teach your immune system to recognize virus and fight with it.