Yes, you can wear shorts. 100% this is fine in your accommodation, and also anywhere near the beach (Aqaba or Dead Sea). I wouldn't recommend wearing short shots in the cities like Amman. If you do want to wear shorts in a more conservative area, then ideally they want to be knee length.