Fix size calculation for write requests

When building a write request take the actual size of the payload, not
the bit size. When writing bits we'll be passing an entire byte, but the
bit size will be 1.