Reliability assessment of dynamic systems with low failure probability can be very expensive. This paper presents and demonstrates a method that uses the Metropolis-Hastings algorithm to sample from an optimal probability density function (PDF) of the random variables. This function is the true PDF truncated over the failure region. For a system subjected to time varying excitation, Shinozuka's method is employed to generate time histories of the excitation. Random values of the frequencies and the phase angles of the excitation are drawn from the optimal PDF. It is shown that running the subset simulation by the proposed approach, which uses Shinozuka's method, is more efficient than the original subset simulation. The main reasons are that the approach involves only 10 to 20 random variables, and it takes advantage of the symmetry of the expression of the displacement as a function of the inputs. The paper demonstrates the method on two examples.