Allow it to fill slowly via a diagonal opening, or have a pressure plate control the power to the pumps.
Although if your pumps are at the same level as your desired top of the moat, you don't have anything to worry about. Pumps can't pump to a higher Z level than the one they're built on. They just pump from Z-1 to Z and that's it. If however you're dealing with water that's at a higher pressure (say filling a cistern underground from a river source above ground), then you can use a sealed passageway to a pump and have it reduce the pressure to the Z level of the pump. Or you can simply have the water pass through a diagonal and reduce the pressure that way. As an example, I have a cistern that's being used to supply a couple of wells in my hospital. The layout is as follows
Z+0
+++++++
+++++++
+++++++
+++o+++
+++++++
+++++++
+++o+++
+++++++
Z-1
### ###
## # ##
# #
# #
# #
# #
# #
#######
The water is coming in from the north at high pressure. But I eliminate that pressure by having it pass through a diagonal. I split them into two diagonals in order to keep the water flow rate reasonable, but that wasn't needed. If I hadn't use the diagonals, I would have flooded my fort.
Take a look at
http://dwarffortresswiki.org/index.php/Pressure for a good simple explanation of how to handle water and magma...