G3 Fax is some version of TIFF if i remember correctly.
So you would probably have to encode some specific variant of TIFF in ASN.1 as described by that X.420 spec from the ITU (its freely available)
It states:
G3FacsimileBodyPart ::= SEQUENCE { parameters G3FacsimileParameters,
data G3FacsimileData}
G3FacsimileParameters ::= SET { number-of-pages [0] INTEGER OPTIONAL,
non-basic-parameters [1] G3FacsimileNonBasicParameters
OPTIONAL}
G3FacsimileData ::= SEQUENCE OF BIT STRING
So, get some decent ASN.1 encoder and just dump a TIFF image in that format into the G3FacsimileData field and it should work.