But for the love of $DEITY, please wear adequate sun protection. At the very least that means a hat and sunscreen, but you probably want to be using long sleeved clothing and sunglasses if you're outside for an extended period of time.
Vitamin D deficiency is bad, but skin cancer is worse.
Vitamin D has anti-cancer effects which apply more generally than skin cancer. In studies which assess all-cause mortality relative to UV-B exposure, higher UV-B exposure is correlated with lower all-cause mortality. That is, more skin cancer yes, but also less death because of improved overall health and lower overall cancer risks. Importantly, this is not an endorsement of artificial tanning, which correlates with greater all-cause mortality. E.g.: http://www.ncbi.nlm.nih.gov/pubmed/21297041
"If you're fair skinned, experts say going outside for 10 minutes in the midday sun—in shorts and a tank top with no sunscreen—will give you enough radiation to produce about 10,000 international units of the vitamin."
You don't need a lot of sun exposure to get your body to produce enough vitamin D.
I have a garden. I have a deck. I have two kids who I take to the pool regularly. I have a lawn that needs maintenance. I like to go outside.
Another thing. I work during the day.
Problem solved.