The optimal control problem for the kinematic bicycle model is considered where the trajectories are required to satisfy the safety constraints in the continuous-time sense. Based on the differential flatness property of the model, necessary and sufficient conditions in the flat space are provided to guarantee safety in the state space. The optimal control problem is relaxed to the problem of solving three second-order cone programs (SOCPs) sequentially, which find the safe path, the trajectory duration, and the speed profile, respectively. Solutions of the three SOCPs together provide a sub-optimal solution to the original optimal control problem. Simulation examples and comparisons with state-of-the-art optimal control solvers are presented to demonstrate the effectiveness of the proposed approach.