Are bow legs and "knock" knees genetic or just the result of poor dietary habits?

They could be normal. Most children are born bowlegged and remain that way until about age two or three. At that point, they develop the knock kneed configuration, which persists until about age six. Bowleg can be caused by rickets blount's disease, trauma a fracture healing incorrectly, and genetic bone growth abnormalities. Knock knees usually develops as part of normal growth, but it may also be due to a disease.
Both possible. Bowed legs (varus knees) and knocked knees (valgus knees) are usually familial traits though less common nutritioinal deficits can cause bowing of the lower extremities. Varus knees are more common in males while valgus knees are more common in women. Corrective osteotomies of the tibia or femur are ocassionally used to relieve pain by changing the mechanical axis of the lower extremity.