This should get the job done for you.
I had the code keystroke a variable so you do not have to mess around with the clipboard and risk accidentally entering the wrong data.
on open the_file
set the_file_Contents to (read the_file)
tell application "Safari"
activate
tell application "System Events"
keystroke the_file_Contents
end tell
end tell
end open
If you wanted the code to use the clipboard still (more efficient for large text files), the code would look like this.
on open the_file
set the clipboard to (read the_file)
tell application "Safari"
activate
tell application "System Events"
keystroke "v" using command down
end tell
end tell
end open