In fact, nitrates are used as a preservative in meats, often making the meat safer than it would be otherwise, from a bacterial safety standpoint. However, I would suggest that you avoid them whenever possible, as foods containing nitrates, such as preserved meats like hot dogs and bacon, are not good nutritional choices for pregnant women because of their high sodium and fat content. On the other hand, nitrates in food are a danger in that they can be converted to nitrites, which can react in your stomach to form nitrosamines. Nitrosamines are potent cancer causing chemicals. Generally nitrates are most dangerous when they are converted to nitrites prior to ingestion, which happens during the cooking process.
Nitrites form under conditions of extreme heat, such as frying.
Therefore, if you choose to eat nitrate containing foods, do so in a manner that minimizes the conversion. For example, you will want to avoid using bacon dripping for cooking, or frying processed ham. It just makes sense to avoid exposure to any potentially cancer causing compounds whenever possible, but most certainly when you are pregnant. Although nitrates in some foods may not be a problem, high levels of nitrates in well water can be. Consuming well water contaminated with nitrates, chemicals or bacteria is particularly dangerous for pregnant women and young infants.