The question is why you need to mention that you have a doctorate.
If you are seeking employment, you clearly need to specify your speciality - a degree in whatever.
If you are a medical doctor meeting a new patient, I am Dr John Doe is fine.
If you are answering a question about the level of your university education, you will presumably already have mentioned your name. You might go on to say that I have a PhD from X university in nuclear physics.
If you are being introduced to someone, I am John Doe is best. You can always mention your academic or other qualifications if asked about them.
If you just want to impress someone, you are not likely to by emphasising how clever or highly qualified you are.
If you are addressing a business or official letter to someone, adding your qualifications and any honours after your name is normal practice.
It all really depends on the context.
PS. I had a surgeon friend who, when asked, would say that he was Mr X. Most people were not aware that senior medical consultants are generally addressed as Mr rather than Dr. Not that he wanted to impress people. He just wanted to stay off the subject.