Just take what the doctor prescribed although personally, I don't think that the prescription will make you oblivious to the fact that you will be receiving an anesthetic via injection, even how much you take. A dentist will also not do a procedure on a patient who is passed out.
If you really and badly need to get a cavity filled up, you may want to request them not to give you an anesthetic although the risk will be is that you will definitely feel what is being done to your tooth which sometimes may be more painful than a simple needle prick.
Is your fear of needles because of the pain you will feel because of it? You may want to ask someone to go with you.
Or, you may want to just forgo taking care of the cavity and just going back to the dentist when the pain of the toothache is worst than getting an anesthetic then, you would probably be more agreeable to getting an injection than suffer that kind of pain.
You may also try to "cure" your phobia of needles. At some point in your life, you will definitely need to have an injection or phlebotomy and it would kind of embarrassing to freak out during that time. You can go into therapy or something like that to help overcome the fear.
Hope this helps.