My toneAC library was designed to work at very high frequencies, 2.66 MHz even! As a bonus, it will also drive the two ultrasonic leads in a push/pull manor which will generate much louder output (almost twice as loud). So, you'll be able to scare those little buggers from further away.
Here's an example sketch that will loop from 40 kHz to 75 kHz. You would connect your speaker leads to pins 9 & 10 if you're using an Arduino Uno. If you're using different hardware, you should check the toneAC website to see what pins to use. You'll also (obviously) need a transducer that can generate sufficient output in this frequency range (I have some that are designed to peak at 40 kHz and 60 kHz).
#include <toneAC.h>
void setup() {}
void loop() {
for (unsigned long freq = 40000; freq <= 75000; freq += 20) {
toneAC(freq); // Play the frequency (40 kHz to 75 kHz in 20 Hz steps).
delay(2); // Wait 2 ms so it will generate output.
}
}