This is how I did it (it'll probably work on anyone's Amazon Fire TV, including yours, no matter what the model is, even if it's an Amazon Fire TV Stick):
Go to http://www.mediafire.com/file/pdls3m2114n5gj2/UndertaleWrapper-signed.apk then install the file downloaded from there on a USB stick with about 131 megabytes of free space or more.
Insert the USB stick into your Amazon Fire TV.
Search for Total Commander on the Amazon Fire TV by typing it in or saying it into your controller or remote that supports voice search on Amazon Fire TV, then go to Install.
After Total Commander has installed, open Total Commander.
After you've opened Total Commander on your Amazon Fire TV, select USB then scroll down to then choose what your Undertale .apk is called, then choose OK at the point where you're shown what Undertale needs access to.
Wait for Undertale to install. It'll take a while. After the install is over, choose Done if you don't want to run the app yet or choose OK to run Undertale on the Amazon Fire TV.
Controls (all of the controls listed below have been tested)
As far I know, only the Amazon Fire TV Remote is supported by Undertale on the Amazon Fire TV. However, when I find out how to play Undertale on the Amazon Fire TV without an Amazon Fire TV Remote, I'll list other controllers and remotes that work with Undertale on the Amazon Fire TV.
Amazon Fire TV Remote
D-pad/navigation pad (whatever you think it's called) - Move left, right, up and down - That's for both situations where you'd need arrow keys or a D-pad for Undertale: navigation in menus and moving Frisk.
Fast forward button - Continue/make selections - That doesn't just apply to menus, it also applies at the point where it tells you to name the fallen human and the points where you have to face an object or character to do something with it/them, such as starting a conversation with another character.
These controllers have been tested with Undertale on the Amazon Fire TV, but they don't work on there:
Amazon Fire TV Game Controller (second generation)
These are some controllers I might try out with Undertale on the Amazon Fire TV in the future:
PlayStation 3 controller
PlayStation 4 controller
USB keyboard
Xbox 360 controller
Xbox One controller