Here is a way for programming a remote for a 2000 Avalon. This method should work for 2001 Avalon also.
Key out
Driver door open and unlocked
Insert key into ignition and pull out
Lock then unlock the power locks from the master switch 5 times
Close and then open the driver's door
Lock then unlock the power locks from the master switch 5 times
Insert the key into the ignition and turn to ON then OFF, then remove key
Locks should cycle - If they don't repeat
Press both the LOCK and UNLOCK buttons on the remote simultaneously for 1 second
Immediately after letting go of the two buttons, press the LOCK button for 2 seconds
The locks should then cycle once. If they cycle twice, try again.
Close the driver door