First, a little context...botulism is extremely rare...only 145 cases in the US in 2015, and of those, only 15% were food borne according to the CDC.  You do need to be aware and careful, but not fearful.  There are lots of easier ways to get sick and die.

Secondly, the risk is higher in low pH vegetables (4.6 or higher) than high pH.  Garlic is an example of a low acid vegetable, but canned tomatoes range from 3.5 to 4.7 on the pH scale (the lower the number, the higher the acidity). Adding lemon, of course increases the acidity, but also impacts the flavor.

Third, colstridium botulinum spores are very heat tolerant.  You need at least 241 degrees F to kill them.  So, boiling, or a quick saute, would eliminate any toxins present, but would not eliminate spores. Cooking your tomato sauce makes it immediately safer (you have eliminated potential toxins), but not from the standpoint of eliminating the spores, because you will never get it to that temperature on your stove or in your oven.  That is why pressure canning (where you can achieve higher temperatures) or pickling (higher acidity preparations) or high sugar preserving are used. These techniques all reduce the risk.

Even with all of the risks accounted for, a week in the fridge, makes sense...probably not much more.  I would make that sauce and feel comfortable with it for about a week...even better if it was being cooked, such as on your pizza.  I would probably discard after a week or so.