Yes - taking megadoses of over 100,000 IU is perfectly safe as a once-off, and there is a comfortable margin of safety. The potential risk from particularly large doses of vitamin D is that your blood calcium levels can rise, potentially causing heart and kidney problems. However, this would only be possible with a vitamin D level of more than 400 nmol/L. To get to that level, someone would have to be taking huge doses of roughly 100,000 IU regularly.