Yes but.....
Referring to e.g.
http://www.vishay.com/docs/20035/dcrcwe3.pdfthe 0402 part is max 1.05 x 0.55 (L x W) mm. Min length 0.95mm. Maximum electrode (T1) of 0.30mm, which means a minimum gap (L(min) - 2 * T1(max)) of 0.95 - 0.6 = 0.35mm.
IPC (nominal / level B density) recommends +0.1 toe, -0.05 heel and +0.0 side. So the pads should be total length 1.25mm ('Z' dimension), gap of 0.40mm ('G'), and width ('X') of 0.55mm. (Which means pads of 0.55 x 0.425mm at +/- 0.825 mm centers.)
6 mils is 0.15mm (more or less), so 6 mils trace + 2 space is 0.45mm, which is just too tight to fit within 'G'. (More exactly, 18 mils is the total track + clearance required, and you have 15.75 mils.)
If these are the dimensions of your footprint, then congratulations, you have an IPC compliant footprint! But, you won't be able to do what you show above.
There's also the consideration of solder mask.
Solder mask alignment is typically 3 mils in any direction.
Minimum web width is typically also 3 mils. We don't have to worry about that here (0.4mm - 2 * 0.075mm = 0.25mm, which is > 0.15mm).
There's also a mask-opening-to-metal clearance to beware of: copper that's supposed to be covered in mask, should have 3 mils of soldermask around it as well, so that the soldermask has a chance to stick to the PCB.
If you place traces as close as possible to the edges of a square pad, the corner of the soldermask opening will be sqrt(2) * 3 mils out from the corner of the pad. Subtract that from 6 and you have less than 3 mils of soldermask around that trace.
At least in Altium, setting the pads as rounded rectangle (with a nonzero corner radius) changes the mask opening to a rounded rectangle as well (as it should be), so mask and copper clearances will come out okay.
So with square pads, the also square route you show would be okay (if clearance is okay).
Tim