In that case, NO
You need to use a framing head with a picket over 2" wide and over 1/2" thick. Larger pieces of wood/pickets will expand and contract enough with moisture to rip the trim nails through or eventually break them off. Screws are not a bad choice in this situation and will last a very long time. There are screws made especially for exterior use. Perfect for this application.
Predrill the pickets with a countersinking bit and you will reduce splitting considerably.