I have done this but my memory is poor on details. I would look in these directions:
Use fdisk to check the 'geometry' of the usb drive, perhaps delete the existing 'partition' and create a new one.
Use mkfs.fat to 'format' - put a fresh filesystem on it. There may be options to do a thorough format. And I would look for ways to find bad 'sectors' and isolate them, though I don't know how possible/difficult this is.
You will need to know what device your flash drive is. If Ubuntu has been automatically detecting this and mouting it for you, try:
when it is inserted and you can read/write to it.
One of the entries on that list will be your drive (look for a /dev/xxxx where x might be sda1 or hdb1), and that's the one you use in the fdisk and mkfs.fat commands. Make sure you get this right - else you may end up formatting your hard-drive - that might give you a bad day. (take it out and try the mount command again, it should be missing)
Also make sure you:
before you do any of this stuff, and make sure it really is unmounted with the mount command again.
Apparently these flash drives don't survive as many write cycles as hard disks, so we are warned that one day (soon) they will die if we keep changing what is on them. Apparently reading from them doesn't cause as much damage.