Well if you didnt wash it, you could in theory pick something up, however i dont think virus's live very long away from a host so would die possibly even with in hours if they are on the mug.
On the up side, i dont think any extremly serious STD's can be passed on through this type of contact, hepatitis B can but its rearly life threatening and anyway your chances of catching anything are very small, because firstly you are makeing the assumption that the guy has the STD.