You most certainly could, though I don’t think the flavor would be as fresh as with the peppers you roast yourself. If you go this route, be sure to drain them well before using and that they are not marinated or packed in any sort of flavored liquid that could throw off the flavor of the pesto.