Improving the resolution of lock-in measurements by tailoring the modulation