As far as dress goes, just ask the doctor or look at how he or she dresses. Hint: try to shadow in an O.R. or E.R. This way you can just wear scrubs and not worry about it, but beware of HIPPA and consult the administrator to see what you need to do to be cleared to observe. Lol im quickly running out of dress shirts for shadowing this family practioner.
It kind of depends on what kind of DO you are shadowing... be sure to brush up on your anatomy/physiology as it pertains to his or her specialty. For family practioners, be sure to look up common drugs for high BP, cholesterol, diabetes, kidney function, thyroid function, and pain; you will probably be encountering these a lot, and knowing the uses/symptoms of various drugs will certainly impress the doctor.
Don't try to chime in constantly and show off your knowledge, but try to be prepared for any questions the doctor might ask. Do the best you can to get the right answer, but if you don't know, don't be afraid to say it. Most doctors love to teach, and some like to preach lol...
Also, it's really important (depending on where you are shadowing) to be extremely nice to the surrounding cast (the nurses, anesthia specialists, secretaries, medical assistants, etc.)... asking them about medicine and generally discoursing with them will show the doctor that you are generally interested in medicine and how a medical operation actually functions, rather than just a LOR.
Always be engaged (no cell phone or day dreaming). BE FLEXIBLE, and up for anything (try to always display a positive demeaner)... you never know what the day will bring lol.
P.S. shadowing in an actual hospital is pretty desirabe, because you will often meet other doctors- which can lead to more LORs
Source: Shadowing my summer away in the O.R. and with a FP.