Let X be a metric space with doubling measure,and L be a nonnegative self-adjoint operator on L2(X)such that the semigroup kernels of e-tL satisfy the upper and lower Gaussian bounds.Given Hormander-type multipliers mi,1≤i≤N,with the uniform estimate,we prove an optimal √log(1+N)bound in Lp for the maximal function sup1≤i≤N|mi(L)f|by making use of the Doob transform and the exp(L2)estimate due to Chang-Wilson-Wolff for the dyadic martingale square function.Based on this,we establish a sufficient condition on the function m such that the maximal function Mm,Lf(x)=supt>0|m(tL)f(x)|is bounded on Lp(X).