Get the vit D from UVB in short time, independent of tanning which is UVA
Clipped from http://sunlightandvitamind.com/ 
Question: Since we cannot really live half of the year in the tropics, we thought about using UV lamps, but it is hard to know which type can reliably deliver the correct amount of UVB rays. Have you investigated specific brands etc? Unfortunately, there is not much help to be had from local doctors, as they usually have a deep prejudice against UV lamps instilled by dermatologists.
Answer: Wolff tanning beds (beds that use Wolff lights) may be used to replete vitamin D. These beds are often referred to as "20 minute" beds. The amount of UV-B is similar to summer sun BUT the danger is in staying too long. You make all the D you will make BEFORE your skin alters in any way, even the very lightest of 'pink'. Tanning actually reduces the amount of D you are able to produce on your skin. Light skinned persons would need 7-10 minutes, maybe less, to produce significant amounts of D. A responsible proprietor and NEVER staying longer than you need are keys to safe use of tanning beds. Further instructions on safe use of beds may be found in the Sunlight Packet below.  A note of caution- any exposure to UV light lowers the amount of vitamin A and vitamin C in your skin .If you decide to use light to produce vitamin D consider how much extra A and C you need to keep your skin happy and healthy.
Question: ...have read (looked at) several articles on this subject. They give good descriptions of the beneficial effects. But so far, I have not seen (Yes, I'm sure it's there, somewhere!) a listing of times considered advantageous. And yes, there are many factors. For instance, time of year, condition of the sky etc but the one I'm interested in is time for an average person, at a reasonable latitude, like 35 °, and importantly the % coverage of the sunlight recipient! If a person is nude they require less time than if one is in normal clothing and a person dressed like an Eskimo might as well stay inside. Can you give any benchmarks for a person such as me. And yes, I have another disadvantage, I'm 86 years old!
Answer: Some researchers suggest a particular amount of sunlight is equivalent to a particular 'dose' of D. I have been testing 25(OH)D in several hundreds of clients since 2000 and found no correlation of either D intake or sun exposure and 25(OH)D that was useful long term as a rule or guideline for others.
Aging skin produces significantly less D even when UV-B is present and there is the issue of excess sun exposure, level of vitamin A present in skin, level of cellular anti-oxidants including vitamin C, and the incidence of skin cancer. Life requires we balance benefit and risk of all our behaviors.
At 38° north a very light skinned person might need 10-12 minutes per side, mostly naked, between 10AM and 2PM, to raise D to between 50-60 ng/ml. By December 25(OH)D may drop below 40 ng/ml. If the location was in a city (with city haze) vitamin D production might be much less.
Nude does not correlate with time at all. You make as much D as you will make just prior to 'erythema' (pinkness or the equivalent) which might be 7 minutes in very light skin and as much as 120 minutes in very dark skin (which also may burn from excess exposure but you won't see it). Sunning longer will not produce more. You have just so many genetically pre-determined "vitamin D factories" per cm of skin, some parts of the body having more factories than other parts. More skin will produce more D but again, this is incredibly variable in 'amount'. UV-B intensity, skin color, skin age and your genes all alter outcome.