Taking your shoes off in an office can be okay as long as your boss says it's okay.
Some offices want their employees to wear shoes or at least some slippers even when sitting at a computer and desk.
However wearing regular shoes can get uncomfortable and I asked my boss one day when I used to work in an office if it would be okay to take my shoes off while at my desk and he said it was fine.
I just had to put my shoes back on when I walked around the office which was okay with me.
I became much more productive when working with my shoes off as I hate wearing shoes and my feet start hurting as well.
I work from home now so I can go barefoot etc all over my house.
But if I had an office and had employees I would allow them to remove their shoes when at the desk as it does increase productivity and makes the employee more comfortable as well.