Certain stds you need to wait a while to get tested for. And condoms aren't 100 percent protective. But if you were wearing one and there was no skin on skin contact, you should be fine. Shaving can cause the itchiness you feel. So you should be ok.
Also, my pubes are itchy (but I shaved them the other day) and I found one tiny bump near the head of my penis. I have no pain/burning when I pee but I have a constant feeling of numbness in the head of my penis