Safe or not?

I switch from birth control pills to the shot the same day of my last birth control pill. My doctor said I should not need to use a back up method but now I'm worried that I could have gotten pregnant. Any advice?