Can I wear an orthotic in a dress shoe?

Absolutely, yes you can and for men, the full length orthotics will fit in practically any type or style of lace up dress shoe ("loafer" styles most of the time do not accommodate a full length device).  In the case of woman's dress shoes, an orthotic is rarely needed in a heel height greater than 2 inches as these shoes generally place your foot in a more corrected and stable position.  Your doctor can show you how to select proper fitting dress shoes at any heel height and style.  But with that being said, it is very common for woman's dress shoes under two inches to necessitate an orthotic but keep in mind that - that style orthotic will not function well in a sneaker, so multiple pairs would be necessary in this case.