What kind of "teaching" do you want to do. Pre-clinical teaching will require a PhD in a specific science, and does not necessarily require an M.D. (unless of course you plan to teach pathology). Likewise, introductory clinical medicine classes can be taught pre-clinically. For the most part (at least from my experience), M.D.'s generally become faculty members of the hospital and work and teach the students/residents that train there. At times, they give lectures in pre-clinical settings, but are rarely given their own course responsibilities. I suppose what I am suggesting is that you may not need a PhD to teach in medical school, unless you want to focus completely on a basic science - for which you already know you need a PhD.
Research is pretty much an absolute requirement to teach in academic medicine - in fact, it dictates your promotion up the academic ranks. Also the more you complete and publish during residency, the better off you will be. In lieu of a PhD, you may consider a fellowship in a specific area of your field, which will give you both research experience and bolster your academic credentials.