A gradient method can provide a global optimal path in indoor environments. However, the optimal path can be often generated in narrow areas despite a sufficient wide area which lead to safe navigation. This paper presents a novel approach to path planning for safe navigation of a mobile robot. The proposed algorithm extracts empty regions using a ray-casting method and then generates temporary waypoints in wider regions in order to reach the goal fast and safely. The experimental results show that the proposed method can generate paths in the wide regions in most cases and the robot can reach the goal safely at high speeds.