The role of selection and environment in shaping genetic variation in Drosophila