Could vitamin d prevent type 1 diabetes?

No. There is no evidence that a deficiency in d or any supplement would alter the course of type 1 diabetes.
Maybe. Evidence is , in large population studies, that lower the vitamin d, higher rates of diabetes; but no proof that supplements will decrease risk exist yet.