Herpes and syphilis can be transmitted even with protected sex, but your skin should touch the lesions those infections had produced in your partner's skin to get infected. You would have seen the lesions.
As your encounter was protected there is not too much to worry about(unless the condom broke...) but if you are really concern, you can test for syphilis 6 weeks after the encounter and for herpes 3 months after the encounter.
If your test for syphilis comes back negative, you should repeat it 3 months after the encounter, as there are people that take longer to show a positive result.
All the best.