If you use a ceramic 1uF for C4, it should be rated 50v or higher. It really won't make much of a difference if it's there or not.
The diodes seem to be in correct layout to me.
You only need the "special" diode at the input of the regulator, to protect it from transients and crap produced by the car's alternator as it charges the battery of your car.
The other two diodes can be any kind of cheap diode, as long as they're rated for more than the output voltage of the regulator. It could be something as simple as an 1n400x diode, where x can be 1,2..7.. difference is just maximum voltage supported by diode .. so 1n4001 would be max 50v, 1n4002 would be max 100v ... 1n4007 would be max 1000v
The D3 diode is really only needed if you use the C3 capacitor, and it's there to protect the regulator from voltage coming back into the regulator.
D2 is also kind of optional, but a good idea to be there if you use a big capacitor on the output (or devices connected to the usb have big capacitors inside)
Since you don't know what you'll plug in the connector, it's better to have that diode always there.
See datasheet of LM338 :
http://www.ti.com/lit/ds/snvs771c/snvs771c.pdfSee page 12, section 8.2.1.1 Design Requirements where it explains the role of those components. See also chapter "protection diodes", section 8.2.1.2.3 (page 14).
It explains there... but I can try to explain it... Let's say you have a big capacitor and it's charged with energy and there's 5v on the capacitor. Now imagine you suddenly disconnect the battery or whatever powers the circuit. So on the input the voltage suddenly drops down to 0, but you have 5v on the output and now the energy tries to go back from the output back to the input ... if it goes through the chip, the chip can be damaged. So by placing the diode between the output pin and the input pin, you create a more direct path for the energy from the capacitor to go instead of going through the chip.
The components inside the regulator in theory can handle up to 25v as the datasheet says, but that may vary depending on who makes the chips... there's lots of companies making LM338 regulators.
Also, keep in mind that some of these datasheets were written 10-20 years ago and the text can be vague ... for example the datasheet I linked to is copyright 1998-2016, and while the text of such datasheets is often updated and revised, it's better to stay on the safe side.
For example, the text on page 14 says "Most20-μF capacitors have low enough internal series resistance to deliver 20-A spikes when shorted." - but were they talking about regular electrolytic capacitors from the 1990s or 2000s which have worse specifications than the modern 2010-2020 electrolytic capacitors, or did they update the text with the modern components in mind? Or, were they thinking of tantalum capacitors or ceramic capacitors? Tantalum capacitors were often favored back then because they had better characteristics compared to electrolytic capacitors.
Linear regulators don't need a lot of capacitance. Some regulators require a certain minimum of capacitance, like 10uF for this particular regulator.
Some regulators (due to their internal design) require some capacitance as long as some other requirements are met.
For example, datasheets of regulators in the 1117 series recommend having a capacitor with ESR between 0.1 ohm and 1 ohm at the output...
A 10uF 16v electrolytic capacitor may have an ESR value that's higher than 1 ohm, but a 47uF 25v electrolytic capacitor may have around 0.3-0.5 ohm ESR and the regulator would work fine. It's not just the capacitance but also the volume of the capacitor, often capacitors rated for higher voltage are also a bit larger.
An electrolytic capacitor that's too big, could have too low ESR .. for example a 820uF 10v capacitor could have ESR below 0.1 ohm and that's not good for a 1117 regulator.
Polymer (solid) capacitors can have very low ESR.. for example you may have a 100uF 16v polymer capacitor with ESR below 0.1 ohm .. that could cause the regulator to not work right.
Also, ceramic capacitors typically have very low ESR, under 0.1 ohm so it's not safe to just use a 1uF or 10uF ceramic capacitor with a 1117 linear regulator.
Some old datasheets don't even mention this ESR thing, but simply say "a 10uF capacitor is enough for stability" - because datasheet was written in the days where tantalum capacitors were more popular and a 10uF tantalum capacitor of that age had an ESR value higher than 0.1 ohm for sure (and ceramic capacitors were maybe too expensive to consider back then).
So you have the be aware of the minimum requirements but you have some room to "optimize" the components to make your circuit cheaper by using slightly bigger capacitor, or a different diode, things will work unless you have some very strict requirements (efficiency, heat produced, noise produced by regulator etc)
The capacitance is more important when it comes to other types of regulators .. switching regulators, inverters, charge pumps.. these function in a different way and capacitors are more important
Maybe this video can help you understand some things