I gave birth a month ago and had sex with my husband, we used a condom. Is it possible to be pregnant since I had sex before 6 weeks like told by doc?

You used a condom. It certainly would have been possible to get pregnant but you took proper precautions and used a condom. Unless you have some reason to fear the condom was not used correctly then condoms work very well. Consider starting birth control.