Flatten Vertices will move all vertices in the selection so they all have a z position of 0. Just select your edges you want to flatten and go Plugins->Flatten Vertices->To Z=0.
In this update I've included a method to flatten vertices based on the average normal of all the selected faces. Select your faces you want to flatten and go Plugins->Flatten Vertices->To Mean Normal.
Known Issues:
Currently the script doesn't preserve the edge conditions (ie, if outside the edge of your selection there's a non-triangular surface the surface will most likely be removed when you run this script. Try triangulating surfaces with TIG's triangulateFaces.rb first then run Flatten Vertices).

