This paper proposes an optimal time-efficient numerical method for solving the initial value problems (IVPs) of ordinary differential equations (ODEs) that is both A-stable and hyperbolically fitted. The method is designed to handle both constant and variable step sizes, making it highly adaptable to different types of ODEs. The methodology proposed herein leverages the optimization of an off-grid point, derived from the predominant term of the local truncation error, to enhance both accuracy and stability in the solution of stiff ODEs. This approach incorporates a variable step size control, predicated upon the error estimation furnished by the embedded pair, and aims to minimize computational expenses while concurrently safeguarding both precision and stability. Furthermore, the stability domain of the proposed method is demonstrated to be optimal, signifying it encompasses the maximal conceivable set of step sizes wherein the method retains its stability. Other important measures including zero-stability, consistency, and convergence are also discussed theoretically and confirmed experimentally. Numerical experiments consisting of the Duffing system, sinusoidal stiff system, periodic orbit system, two-body system, Lorenz system, and the system for catenary equation demonstrate that the proposed method is highly competitive in terms of accuracy and efficiency, and outperforms several existing methods for solving stiff ODEs with both constant and variable step sizes.