Yes - you can substitute the butter for hard margarine, but you will get a less buttery-tasting pastry.