If you were directed to self medicate under the direction of a vet, I see no problem with this. However, if you're just picking a dosage out of the clear blue sky, I'd not recommend that.

As far as if it's safe, did the vet know that the snake was gravid? If not, a quick call to him/her will answer your question. I'm not prepared, nor qualified to give you the correct answer.

Good Luck!
Jim Smith