Can I take Prilosec and pepcid (famotidine)?

Yes. As long as you need both to control your symptoms. However you should consult your doctor if you do require both drugs regularly to control your symptoms just in case there is something more serious happening.