I asked the same question recently on emacs-devel and Kenichi Handa told me I could do:
(defvar my-TeX-input-method-tweaked nil)
(defun my-quail-activate-hook ()
(when (and (not (member (quail-name)
my-TeX-input-method-tweaked))
(member (quail-name) '("TeX" "latin-1-prefix")))
(quail-defrule "uu" "ū")
(push (quail-name) my-TeX-input-method-tweaked)))
(add-hook 'quail-activate-hook #'my-quail-activate-hook)
Of course, you'll want to adjust the list of input-methods you want to modify. If you don't want to touch input methods, or if you want the "uu" rewriting to only take place in some specific contexts, you could do something like:
(defun my-uu-rewrite ()
(when (looking-back "Iuu" (- (point) 3))
(delete-region (- (point) 2) (point))
(insert-and-inherit "ū")))
(add-hook 'post-self-insert-hook #'my-uu-rewrite)