I use D&D as a source of inspiration in my writing, but the problem is sometimes I use monsters I see in the Monster Manual in my stories. Is there a way to know which ones of them are under copyright protection, so I can protect myself by not including them in my stories?
As far as I could find, here's a list of monsters that are copyrighted:
Beholder, Gauth, Carrion Crawler, Displacer Beast, Githyanki, Githzerai, Kuo-toa, Mind Flayer, Slaad, Umber Hulk, Yuan-ti, Tanar'ri, and Baatezu. (Reddit)
Many DnD monsters are from mythology and/or folklore, so as long as you don't use the specific name (which may be copyrighted) but use the monster's appearance, you should be fine. If you're looking to publish the work that includes said DnD monsters, it's always a good idea to consult someone like a copyright specialist beforehand so you don't get sued.
All published Dungeons & Dragons creatures are under copyright protection. The normal loopholes apply: for example, if a creature is too common to be copyrightable, or if you make fair use of it.
The monsters in weakdna's answer are designated as Product Identity, which is only relevant if you publish your stories using the Open Game License, which gives permission to use copyrighted material under the license's terms, but excludes Product Identity.