D-optimal designs for prospective cohort studies