Basic answer: it's generally recommended to sterilize jars before storing low-acid foods at room temperature. (Many canning procedures effectively sterilize the jars during processing.) In your case, you should be certain the jars are clean and thoroughly dry as well.
Regarding your overall proposal: I'd only give away food gifts like this if I had prepared them according to an established procedure and recipe tested by a reputable food safety and preservation organization. Your proposal sounds like it could be safe, but I can't find any such recipes at the National Center for Home Food Preservation or similar sources. Generally, most food safety websites don't recommend storing any homemade flavored oils at room temperature or for more than a few days in the refrigerator. (There were some older recommendations that allowed for dried herbs and/or herbs that were strained out of oil after a brief infusion, but even these were found to have a small risk -- because only lab testing can determine whether herbs are dried sufficiently or whether you've managed to strain out all the small particles -- and are no longer listed on most food preservation sites.) Commercial preparations of flavored oils almost exclusively involve prior acidification of the additives to ensure safety.
Also, I would note that heating the oil hot enough to kill botulism bacteria will cause it to degrade somewhat in quality and flavor. (This is another reason why commercial preparations use acidification.)
Lastly, just my opinion: I don't want to overstate the risk here (which is likely low), but without a tested procedure it's impossible to know for certain when storing low-acid foods at room temperature. And botulism toxin can be deadly. I know it sounds like a nice idea, but I personally would not give flavored oils as gifts. Even if I found a reputable recipe from a food preservation site that had been scientifically tested, the people I give these things to have to trust that I know what I'm doing. Personally, I tend to discard any flavored oils I've received as gifts before using (unless I would trust the person and know how the food was prepared).