While ghee is a good substitute for frying it can also be used in pastry cooking. You may find that the baked pastry will be slightly greasier and short-crust pastries may puff a little. These are however minor matters for home baking. If ghee is all you have on hand go ahead and use it for your pie crust.