Well as far as a generic D&D game, it's up to the GM. I know for a fact that Faerun has contraceptive herbs.
Cassil: A small shrug similar to a mustard plant. Its seeds are ground into a fine tasteless powder that suppresses male fertility. Men who want to avoid fathering children use this herb. A male humanoid who eats a teaspoon of cassil will be inferitle for 3D4 daysalthough it takes an hour for the herb to take effect.
Nararoot: A black, woody tuber with a licoricelike flavor. Shavings are steeped in hot water to make a strong tea that makes females infertile for D4+2 days. Chewed raw (though unpleasant in taste), the root is more potent, working for 2D4+2 days.
Now, I know you can look up ancient/medieval herbal "Abortifacients" (plants that stop pregnancy) on wikipedia. I did some research on this matter for my own world setting I am working on.
Really, it comes down to how advanced is your GM allowing their world to be.
EPSC: She's crazy, lazy and oh-so-lovable!

"The deific powers I emit will surely burn your retinas!!!"
EPSC's World of Art!GHE Art Department