You can connect any capacitor across a DC motor. This is always a good idea, to reduce electrical noise. It may also have a small effect on the motor's torque. But it will not change the motor's speed.
you will have to connect it in parallel with the motor otherwise your motor won't work. DC motor speed is directly proportional to the voltage across it, so if you double the voltage you will double the speed.