Yes, you can substitute walnuts with pecans or almonds if you prefer. The flavor will be slightly different, but still delicious.