Catalysis of the reaction: tryptamine + reduced acceptor + O(2) <=> 4-hydroxytryptamine + acceptor + H(2)O.