The dilemma is solved by using sun exposure or sun-lamp exposure to obtain vitamin D.  Plenty, but never too much, is produced that way, as the body self-regulates production. Sun exposure is the natural way to obtain vitamin D and also produces other essential photoproducts such as nitric oxide, endorphin and serotonin--all essential to human health.  Here are health facts regarding sun exposure of which you may not be aware: 
•A 20-year Swedish study shows that sun avoidance is as bad for the health as cigarette smoking.
•A Spanish study shows that women who seek the sun have one-eleventh the hip fracture risk as those who avoid sun.
•Women who totally avoid the sun have 10-times the risk of breast cancer as those who embrace the sun.
•Women who sunbathe regularly have half the risk of death during a 20-year period compared to those who stay indoors.
•Sun exposure dramatically improves mood through the production of serotonin and endorphin.

References: http://sunlightinstitute.org/