You can definitely add the basil stems to your pesto, especially the thin ones. You may want to remove thick and sturdy stems. Add them to your compost if you have one.