How to mitigate the negative karmic effect of killing
Wanting to become a degree holder is Bhava-tanha or craving to become. That craving is causing you to break the first precept. See how dependant origination is at play here.

You can either look for insects that are already dead or tell your professor that you cannot kill as a Buddhist.