Okay, you are not a failure, just a mom of a three year old. All of my kids were sweeties at 2 and terrors at 3. First, let's just say this pediatrician is not for you. How rude! Most docs are helpful and kind even if they are busy. Just walk away from this one and tell yoursel you and your son just dodged a bullet.
Now, about the back talking and such. It has worked well for me to have a system of ignoring this behavior. What I mean is that if your child starts in on any whining or back talking or fit throwing, you move away or turn away and do not show any response. I know that sounds like giving in, but 3 is still very young and you won't be able to treat him like an older child with grounding or taking away privileges. He wants your attention, but he can't have it if he misbehaves. If you are in a store you leave (that one is hard but I promise it i worth it). If you are home you can walk a little away from him. If he follows you just busy yourself doing something else. He may throw a hairy fit when you do this the first few times but when he is calm just let him know that you can't talk to him when he acts that way.
Now, the other side of this is of course making sure he has lots of positive mom reinforcement. Any time he is kind or sweet or helpful or plays quietly or does anything at all that you approve of (we also taught about using a "big boy voice" rather than whining) you tell him how good he is and how much you love him. For example if you are at the store and he is behaving you would say, "Look how good you're being! It is so helpful to Mommy when you sit still in the cart (or walk right with me)! Thank you!" Big smile for him, pat on the head, ect.
You also need to thin about involving him whenever you can. Get his help with chores and errands even if you are just pretending that he is helpful. His attention span is super short right now and he is going to jump from thing to thing to thing, but if you have alternatives for what to keep his attention, it will be easier on you. Begin to teach "eye spy", play green light red light at the doc's office, play simon says, ask him lots of questions about things you see, teach new words. My youngest is 7 and still wants to play all of our little games when we have to wait somewhere.
Anyhow, good luck to you. I know this is a difficult new phase, but you just stay strong. You are a good mom and you love your son. Everything will work out.