40 gallons is not a lot of water so you should be able to get away using even the smallest of pumps. Pumps are usually rated by how many gallons they pump per hour (GPH). If you go with an 80 GPH it will move all of the water in you pond twice per hour or once every 30 minutes. A pump serves serval functions, one of which being filtration. If you plan on having plants and fish, then 80 gph should be good. If there are no living things in your pond then you can go lower if you want. Try to selected a pump that has low wattage for the amount of water it moves.