Yes you can, it just won't be quite as smooth but the traditional way to do it is in a pestle and mortar. Start with the garlic (if using) and a pinch of salt and pound together until a paste. Then add the basil, chopped, little by little until they form a paste. Add nuts and repeat. To add the cheese, grate it finely then mix it in little by little, along with the pepper and the lemon juice/zest. Add the olive oil slowly, pounding into the sauce as you go. This will aim to emulsify it a little rather than having little bits of basil and pistachio suspended in oil.