Humanoid robots possess the capability of stepping over or onto objects, which distinguishes them from wheeled robots. When planning paths for humanoids, one therefore should consider an intelligent placement of footsteps instead of choosing detours around obstacles. In this paper, we present an approach to optimal footstep planning for humanoid robots. Since changes in the environment may appear and a humanoid may deviate from its originally planned path due to imprecise motion execution or slippage on the ground, the robot might be forced to dynamically revise its plans. Thus, efficient methods for planning and replanning are needed to quickly adapt the footstep paths to new situations. We formulate the problem of footstep planning so that it can be solved with the incremental heuristic search method D* Lite and present our extensions, including continuous footstep locations and efficient collision checking for footsteps. In experiments in simulation and with a real Nao humanoid, we demonstrate the effectiveness of the footstep plans computed and revised by our method. Additionally, we evaluate different footstep sets and heuristics to identify the ones leading to the best performance in terms of path quality and planning time. Our D* Lite algorithm for footstep planning is available as open source implementation.