How to use the /fill command with black wool or oak wooden planks?

For black wool:

/fill X1 Y1 Z1 X2 Y2 Z2 wool 15

The value after the block type is its data value, which is 15 for back wool.

For oak planks

/fill X1 Y1 Z1 X2 Y2 Z2 planks

As of Minecraft 1.13, filling areas with black wool no longer requires the use of cryptic numbers:

/fill X1 Y1 X1 X2 Y2 X2 black_wool