You will have to re-paint the wall anyway so sand down across the top and bottom line with sandpaper and a block as the paint where the rail was will be thicker than the rest of the wall,hoover along the space and spray it lightly with water to remove the dust,fill with pollyfiller and sand it down again.You may have to fill it/sand it a couple of times,it's messy and time consuming but Hey!
Rich
March 2008