lftp: login, put file in remote dir and exit in a single command: proper quoting help
$ lftp -c "open -u user,pass ftpsite.com; put -O remote/dir/ /local/file.txt"
should do it.
If this doesn't work try adding to your /etc/lftp.conf
the following lines:
set ftp:ssl-protect-data true
set ftp:ssl-force true
set ftp:ssl-auth TLS
set ssl:verify-certificate no
lftp -e "put -O remote/dir/ /local/file.txt; bye" -u user,pass ftpsite.com