Just check the last three characters of the string, and match them against your file type. If they match, it's one of your files.
... is a reasonable assumption, but not rock solid. It is possible for three letter extension clashes to exist.
Your .mytrack files should start with a header section that you also check for when you attempt to load it. That way if someone has simly renamed their picture.bmp file to picture.mytrack you wont be trying to load invalid data. The header might include things like a version number, so that later developments in your code will recognise earlier (less feature rich !) versions and know what to do with them.