I had a request for an in person interview but was unable to fly out there because of time restrictions and ended up having a skype interview. After ten days from the phone interview, I am visiting the place where the company is. Could I still write to them and ask them if I can visit? What would be the best way to frame it in an email?
It really depends on what you're trying to accomplish. If you knew that a second, in-person interview was coming up at some other time, and was thinking of asking them to reschedule to this date that might have been a good idea.
However you've already been through the interview and have nothing left to discuss with them until they get back to you.
At most, what you might do is phrase an e-mail along these lines to the HR manager:
It was a great pleasure talking to you on Skype during our previous interview. I wanted to let you know that I am going to be in town on April Y, and that if you required any further clarification regarding my experience it would be my pleasure to meet with you at that time and discuss my qualifications.
This way you're not trying to force your way in, you're simply informing them that you're available.
If you had separate plans to be in the area while scheduling the interview, it would have been ideal to bring it up at that time. However, I don't see any reason that you can't bring it up now. I'd simply phrase it as, it turns out you'll be in the area for separate reasons, and you'd like to take the opportunity to have a tour of their office, if they might possibly have time to accommodate you.