Are there any rules about masking? I am currently programming an experiment where participants have to do a divided visual field task. In a paper about the correct methodology about these tasks, it is said that you should use a backward mask (a mask after the target) in order to avoid after-images.

I have no objection of inserting backward masks in my experiment, but I just can't find any rules about how to implement these correctly.

Does it matter if I use a random black/white pixel rectangle where the target was or some symbols (e.g., ### is often used in psycholinguistic experiments) on that location? Or should I put random black/white pixels over the whole screen?

(Location of the target/mask is not important for the participants, so a target-located or a full-screen mask does not change to the goal of my research.)
Your question was a loooooong time ago, but I just ran across a couple of good references explaining what backward masking does and how to choose one.  This(1) is a great paper examining the neural mechanisms and timing of visual backward masking; according to this (2) 2000 review of masking theory, there are four subtypes of backward masking.

Backward masking can be achieved by 


light, when the target is masked by a larger and spatially overlapping uniform flash of light.  
metacontrast, when the mask does not overlap the mask spatially.
structure, when the mask overlaps the target as well as shares many structural features of the target.
noise, when the mask consists of random-dot noise over the target.


(There are some papers from the 1960s &amp; 1970s talking about the transient vs sustained activation theory of backward masking function, but they are hard to find online because of their age so I have not included them.)

It's probably a good idea to go and read the 2000 review paper--the full paper is publicly available at that URL--because what kind of backward mask you choose depends on the hypothesis of the experiment.

References
(1) Journal of Cognitive Neuroscience, May 1999, Vol. 11, No. 3, Pages 300-311. doi: 10.1162/089892999563409
(2) Perception &amp; Psychophysics, December 2000, Volume 62, Issue 8, pp 1572-1595.