Yeah, it sounds like leaving nice clothes at work and changing into them when you get there would be a good option for you. If your normal office is on the way to/from the 18-mile office, you could drop them off that day since you'd be driving anyway.
Also, maybe this is just my profoundly lazy way of thinking, but if you start biking 40 miles a week, couldn't you cut back on the number of days a week you go to the gym?