Healthy pregnancy weight?

Kylie
Ive gained about 40 pounds since i got married last year and for the first time ever I am overweight. Im trying to lose now by eating better and adding exercise into my life. I am also TTC. Is it ok to continue to stick to a strict diet and exercise routine while pregnant and possibly lose fat?