for saving Integers it is much cleaner to open the file in BINARY mode and use PUT to store the data, which just lumps the data unformatted into the file and expects you to know the byte length of the individual pieces of data you store and read them in correctly. WRITE formats the file for you that's why you get spaces.
If you need an example..
Open FileName$ For BINARY as #1
PUT #1,,MyInteger
Close
To retrieve the data,
Open FileName$ For BINARY as #1
GET #1,,MyInteger
You just need to design your getting and putting so you can retrieve the data without much confusion....