If you are not working in a strictly formal environment such as a bank or lawyer's office then yes. However, pair them with traditional formal wear such as a white shirt and blazer. Also, choose loafers instead of sandals to maintain a professional look. I would also go with rather black shorts that don't have a destroyed look.