Let's break this sentence down bit by bit:
The proposed formalism1 enabled us to employ various heuristics in specifying contextual rules2 to eliminate unwanted parts of each website3.
1This is the subject of the sentence. You are talking about this mainly, and what effects it has had and what it can do for you. In specific, "formalism" is your subject, and the inclusion of "proposed" before it implies that its (the formalism's) proposal helped you get to where you are.
2Again, you're talking about formalism. Its proposal alone (with no other factors, just the mere suggestion of it) allowed you to do the things you list, such as specifying contextual rules. When you use 'in' to describe the type of specification, you are implying that the heuristics deal specifically with contextual rules and as one of their features, allow you to specify which contextual rules you use.*
3You're talking about the grander scheme of formalism here. What you wanted to do was focus on each website in question, and to do that, you had to come up with something - tada, formalism, which encompasses the above two areas: heuristics, and contextual rules.
*Now for what your sentence would actually mean had you included 'the.' It means "a specific set of contextual rules which would eliminate the pre-specified [you get this through inferring] parts of each website which [the parts] is unwanted." If you didn't add 'the,' which you didn't, you'd get something like: "heuristics ... which specify various contextual rules, none of which are website-specific, that [regularly, on a time-scale, as part of their function] eliminate general unwanted parts of each website."
So, adding the is optional, but it does change the meaning of your sentence.