Keto and pregnancy

*disclaimer* I'm not pregnant yet, but my husband and I are trying.

My doctor suggested a while ago that I try keto to lose some weight, but I didn't think to ask how safe during pregnancy. I was wondering if anyone here knew if you could be on keto when pregnant.