tar itself cannot do this, so you have to create it from a correctly ordered list. In principle you could then use
-T option, but there is no way to specify that the filenames in that list should be NUL terminated. So if you have any filenames with newlines in them (which is allowed) this will just break.
A better option is to use
cpio to generate the files as that accepts a NUL terminated list of filenames and can generate tar files.
tar command would be:
tar cvf /somedir/all.tar .
Then for this to be sorted by name you would have to do (assuming GNU find and cpio):
find . -type f -print0 | sort -z | \
cpio --create --null --format=ustar -O /somedir/all.tar
This has the disadvantage though that subdirectories are placed in between filenames. You can do tricks with
finds -printf0 specifying the directory and depth information and sorting with
sort -n but that also influences how files with numbers are sorted within a directory.
If the above is not satisfactory you could probably use a small python program based on
os.walk() to generate the ordering you want with full control (depth first, based on extenion etc), but if you go that route you might as well drop
cpio and write out the
tar file with python's