Keith has the most cost-effective solution to the problem, a surge eliminator. I have seen this implemented by installing a parallel vertical closed-end pipe stub filled with air, which unlike water is compressible. The air acts as a shock absorber, and dampens the pressure wave created by the fast acting solenoid valve. The stub should be placed as close as practical to the offending valve, and care should be taken that it does not fill with water prior to closing the end. Also, the larger the diameter of the pipe stub the better.