Most dress heels have a narrow toe box.
Because of the heel, the foot has a tendency to slide forward and force the toe into this tight area. Consider shoes with a lower heel and wider toe box. If the toe doesn't improve in a few more days, or becomes painful, have a podiatrist check it. You may have irritated the joint or aggravated an ingrown nail.