Insecticides could be developed that kill pests without harming beneficial insects such as bees, according to a new study.