The problem is most likely resulting from a leaking toilet flush valve flapper. The water level in the toilet tank leaks down a bit, then the water valve opens to make up the minor loss. Not enough to be noticed as a normal fill, but enough to cause a minor water hammer when the valve closes.
To test the flapper, closely examine the water in the toilet bowl after the fill cycle has stopped. If you see any ripples or motion in the water, the flapper is leaking.
Another way to test the flapper is to wait until the tank is full and the water valve stops filling, then add a few drops of food coloring to the water in the tank. If the colored water gets into the bowl the flapper is leaking.
The solution is to replace the flapper.
When installing a flapper it is important to make sure the hangers are properly positioned or in the case of a ring style hanger on the standpipe, make sure it is positioned correctly.
