I get pain similar to that when there's not enough arch support in my cycling shoes and I find myself clenching my toes to keep my foot stable inside the shoe. Quality insoles take care of the problem for me. I have blue Superfeet in my MTB shoes, and gray ones in my road shoes- though, honestly, I can't really tell a difference.