It is entirely alright to wear shorts in Japan. While it may be a bit unusual amongst Japanese males, especially on work days, shorts are not out-of-bounds whatsoever. As well as they are extremely usual among travelers in the summertime.