Pins 4 and 6 are 5V and ground respectively, so you are connecting them directly to power. There is no way to control the speed of the fan using that setup. If you were to use a PWM pin to control a transistor, and connect the Fan to that, you would then be able to write code to control the speed of the fan. Your best option might be to just get a quieter fan that can run at full speed unless you want/need the ability to control its speed. The other option would be to put a resistor in series with the fan as you currently have it connected, this will lower the speed and should reduce the noise, but it wont be software adjustable.