A specific class of stochastic heat engines driven cyclically by time dependent potential on the positive real axis is analyzed, and most of their physical quantities can be obtained explicitly, including the entropy, internal energy, output work (power), heat exchange with environment. Method of optimization according to the external potential to reduce the irreversible work, and then to increase the energy efficiency, is presented. With this optimized potential, the efficiency η * , efficiency at maximum power η * EMP are calculated and discussed briefly.