An overdose is an excessive and dangerous dose of a drug, so the phrase "for a long period of time" doesn't make sense in the sentence (although its grammatically correct). The correct way to use overdose is:
Doctors advise patients not to overdose on vitamins.
Notice that the construction is always overdose + on + (something). Overdose can also be used as a noun. For example, many people who overdose on heroin require immediate medical attention.
You can also use "to not" instead of "not to" for the same meaning. "Not to" is slightly more common.