Can I still use time machine if I encrypt my drive with file vault? I read somewhere that there are some problems with the time capsule if you encrypt your mac, so I would like to know those before I do that.
Yes, you can still use Time Machine backups even if you encrypt the boot drive with FileVault.

Note that when setting up Time Machine backups, you'll have to select that the backup should be encrypted as well, otherwise your data will be stored unencrypted in the Time Machine backup.